<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./vue.js"></script>
</head>

<body>
  <div id="app">
    <q-bannar></q-bannar>
  </div>
</body>
<script>
  const { createApp, ref } = Vue;

  const app = createApp({
    setup() {
      app.component('q-bannar', {
        template: `<div style="border:3px solid green">
			            <p style="color:red;">这是q-banner组件 </p>
						{{title}}
			          </div>`,
        setup() {
          let title = ref('hello 我是一个全局组件')
          return {
            title
          }
        }
      })


    }
  })
  app.mount('#app')
</script>

</html>